package com.itheima;

public class ZuoYe08JueDuiZi {
    public static void main(String[] args) {
        double num=jueDuiZhi(-5);
        System.out.println("绝对值是："+num);

    }
    public static double jueDuiZhi(double a){
        if (a<0){
            a=-a;
        }else {
            a=a;
        }
        return a;
    }
}
